﻿using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using TTGame;
using CinemaDirector;
using TTGameEngine;

/*
 * FPSModeTrigger
 * 使玩家进入FPS模式。
 *
 *
 * 依赖：
 *
 * ！不写重复代码！
 * @author TTun
 * @date 9/23/2017 2:15:58 PM
 */
[CutsceneItemAttribute("LT Trigger", "FPS Mode Trigger", CutsceneItemGenre.ActorItem)]
public class FPSModeTrigger : CinemaActorEvent {

    [Tooltip("FPS攻击时间间隔")]
    public float attackCD;
    [Tooltip("FPS模式持续时间")]
    public float FPSTime;
    //子弹Tag，用于打击效果
    public string bulletTag;

    public override void Trigger(GameObject actor) {
        SkillTL skill = this.GetSkill();
        //fixed:停止技能脚本时，脚本上所有剩余的触发器都会触发一次。
        if(skill.IsStopped()) { return; }
        Puppet obj = actor.GetComponent<Puppet>();

        //BattleManager.Share().StartFPSMode(obj, skill.SkillID, skill.SkillCastID, skill.m_skillData, FPSTime, attackCD, bulletTag);

    }
}

